class Solution
{
public:
    int findLengthOfLCIS(vector<int> &nums)
    {
        int n = nums.size();
        if (n <= 1)
            return 1;
        int ret = 0;
        int l = 0, r = 1;
        while (r < n)
        {
            if (nums[r] > nums[r - 1])
                r++;
            else
            {
                ret = max(ret, r - l);
                l = r;
                r = l + 1;
            }
        }
        if (r == n)
            ret = max(ret, r - l);
        return ret;
    }
};